import request from '/@/utils/request'
import {module} from '/@/api/ums'

export default {
  /**
   * 获取列表页的阶段列表，主干与完成分支合并
   */
  getListStages() {
    return request({
      url: module + '/opportunityStage/getListStages',
      method: 'get'
    })
  },
  /**
   * 获取阶段列表, 按照分支和排序号排序
   */
  getList() {
    return request({
      url: module + '/opportunityStage/getList',
      method: 'get'
    })
  },
  saveDisplay(data) {
    return request({
      url: module + '/opportunityStage/saveDisplay',
      method: 'post',
      data
    })
  },
  modifyVisible(data) {
    return request({
      url: module + '/opportunityStage/modifyVisible',
      method: 'post',
      data
    })
  },
  /**
   * 添加
   */
  add(data) {
    return request({
      url: module + '/opportunityStage/create',
      method: 'post',
      data
    })
  },
  /**
   * 编辑
   */
  edit(data) {
    return request({
      url: module + '/opportunityStage/edit',
      method: 'post',
      data
    })
  },
  /**
   * 删除
   */
  remove(data) {
    return request({
      url: module + '/opportunityStage/delete',
      method: 'post',
      data
    })
  }
}
